\(\int \frac {\cosh (a+\frac {b}{x})}{x} \, dx\) [26]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 12, antiderivative size = 21 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\cosh (a) \text {Chi}\left (\frac {b}{x}\right )-\sinh (a) \text {Shi}\left (\frac {b}{x}\right ) \]

[Out]

-Chi(b/x)*cosh(a)-Shi(b/x)*sinh(a)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5427, 5425, 5424} \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\cosh (a) \text {Chi}\left (\frac {b}{x}\right )-\sinh (a) \text {Shi}\left (\frac {b}{x}\right ) \]

[In]

Int[Cosh[a + b/x]/x,x]

[Out]

-(Cosh[a]*CoshIntegral[b/x]) - Sinh[a]*SinhIntegral[b/x]

Rule 5424

Int[Sinh[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinhIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 5425

Int[Cosh[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CoshIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 5427

Int[Cosh[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cosh[c], Int[Cosh[d*x^n]/x, x], x] + Dist[Sinh[c], In
t[Sinh[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps \begin{align*} \text {integral}& = \cosh (a) \int \frac {\cosh \left (\frac {b}{x}\right )}{x} \, dx+\sinh (a) \int \frac {\sinh \left (\frac {b}{x}\right )}{x} \, dx \\ & = -\cosh (a) \text {Chi}\left (\frac {b}{x}\right )-\sinh (a) \text {Shi}\left (\frac {b}{x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\cosh (a) \text {Chi}\left (\frac {b}{x}\right )-\sinh (a) \text {Shi}\left (\frac {b}{x}\right ) \]

[In]

Integrate[Cosh[a + b/x]/x,x]

[Out]

-(Cosh[a]*CoshIntegral[b/x]) - Sinh[a]*SinhIntegral[b/x]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.29

method result size
risch \(\frac {{\mathrm e}^{-a} \operatorname {Ei}_{1}\left (\frac {b}{x}\right )}{2}+\frac {{\mathrm e}^{a} \operatorname {Ei}_{1}\left (-\frac {b}{x}\right )}{2}\) \(27\)
meijerg \(-\frac {\sqrt {\pi }\, \cosh \left (a \right ) \left (\frac {2 \gamma -2 \ln \left (x \right )+2 \ln \left (i b \right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Chi}\left (\frac {b}{x}\right )-2 \ln \left (\frac {b}{x}\right )-2 \gamma }{\sqrt {\pi }}\right )}{2}-\operatorname {Shi}\left (\frac {b}{x}\right ) \sinh \left (a \right )\) \(62\)

[In]

int(cosh(a+b/x)/x,x,method=_RETURNVERBOSE)

[Out]

1/2*exp(-a)*Ei(1,b/x)+1/2*exp(a)*Ei(1,-b/x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.86 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\frac {1}{2} \, {\left ({\rm Ei}\left (\frac {b}{x}\right ) + {\rm Ei}\left (-\frac {b}{x}\right )\right )} \cosh \left (a\right ) - \frac {1}{2} \, {\left ({\rm Ei}\left (\frac {b}{x}\right ) - {\rm Ei}\left (-\frac {b}{x}\right )\right )} \sinh \left (a\right ) \]

[In]

integrate(cosh(a+b/x)/x,x, algorithm="fricas")

[Out]

-1/2*(Ei(b/x) + Ei(-b/x))*cosh(a) - 1/2*(Ei(b/x) - Ei(-b/x))*sinh(a)

Sympy [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=- \sinh {\left (a \right )} \operatorname {Shi}{\left (\frac {b}{x} \right )} - \cosh {\left (a \right )} \operatorname {Chi}\left (\frac {b}{x}\right ) \]

[In]

integrate(cosh(a+b/x)/x,x)

[Out]

-sinh(a)*Shi(b/x) - cosh(a)*Chi(b/x)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\frac {1}{2} \, {\rm Ei}\left (-\frac {b}{x}\right ) e^{\left (-a\right )} - \frac {1}{2} \, {\rm Ei}\left (\frac {b}{x}\right ) e^{a} \]

[In]

integrate(cosh(a+b/x)/x,x, algorithm="maxima")

[Out]

-1/2*Ei(-b/x)*e^(-a) - 1/2*Ei(b/x)*e^a

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (21) = 42\).

Time = 0.25 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.05 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\frac {b {\rm Ei}\left (a - \frac {a x + b}{x}\right ) e^{\left (-a\right )} + b {\rm Ei}\left (-a + \frac {a x + b}{x}\right ) e^{a}}{2 \, b} \]

[In]

integrate(cosh(a+b/x)/x,x, algorithm="giac")

[Out]

-1/2*(b*Ei(a - (a*x + b)/x)*e^(-a) + b*Ei(-a + (a*x + b)/x)*e^a)/b

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x} \, dx=-\mathrm {cosh}\left (a\right )\,\mathrm {coshint}\left (\frac {b}{x}\right )-\mathrm {sinh}\left (a\right )\,\mathrm {sinhint}\left (\frac {b}{x}\right ) \]

[In]

int(cosh(a + b/x)/x,x)

[Out]

- cosh(a)*coshint(b/x) - sinh(a)*sinhint(b/x)